<?php

use Biz\Constants\App\SiteConstants;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * AppSite.
 *
 * @license [http://www.85do.com] [杭州永奥网络科技有限公司]
 * @copyright Copyright (c) 2018-2026 Hangzhou Yongao Technology Co., Ltd. All rights reserved.
 */
class AppSite extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('app_site', function (Blueprint $table) {
            $table->bigIncrements('id');//BigID unsigned
            $table->bigInteger('app_id')->unsigned();//所属APPid
            $table->string('name', 32)->default('');//网站名称
            $table->string('domain', 255)->default('');//网站域名
            $table->string('description', 255)->default('');//站点描述
            
            // 注意时间戳位数
            $table->timestamps();

            // index
            $table->index('app_id');
            $table->index('name');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('app_site');
    }
}